package com.green.web.controller;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.green.service.manage.ModuleService;

@Controller
public class CheckControler {

	private static final Logger logger = LoggerFactory.getLogger(CheckControler.class);

	@Resource
	private ModuleService moduleService;

	@ResponseBody
	@RequestMapping(value = "check")
	public String status() {
		try {
			moduleService.getModuleById("Y");
			return "Y";
		} catch (Exception e) {
			logger.error("CheckControler check error", e);
			return "N";
		}
	}

}
